<html>
<head>
<title>Sources</title>
<style type="text/css">
    *{font-family:Verdana, Arial, Sans-Serif;font-size:12px}
    .name{width:150px;float:left}
    input[type="text"]{width:350px}
    .property{height:20px;width:504px;background:#eee;margin:2px;padding:2px;overflow:hidden}
</style>
</head>
<body>
<form method="post" action="/source/put" >
    <div class="property"><div class="name">Title:</div><input type="text" name="title" value="meta.stackoverflow.com recent responses" /></div>
    <div class="property"><div class="name">Description:</div><input type="text" name="description" value="" /></div>
    <div class="property"><div class="name">Target Url:</div><input type="text" name="url" value="http://meta.stackoverflow.com/users/recent/48465?StartDate=%s&EndDate=%s" /></div>
    <div class="property"><div class="name">Cookie:</div><input type="text" name="cookie" value="ASP.NET_SessionId=z0yrtdbljc4qb2ngimroezf0; somuser=t=LmK5hX+vPU-0809135901&s=mSRLO3gMnU-0809135901" /></div>
    <div class="property"><div class="name">Item Region:</div><input type="text" name="item_region" value="(?s)<h2>Most Recent Responses.*?<tr>(.*)</tr>.*?</table>" /></div>
    <div class="property"><div class="name">Item Separator:</div><input type="text" name="item_separator" value="<tr>" /></div>
    <div class="property"><div class="name">Item Title:</div><input type="text" name="item_title" value='class="user-details">[^>]*>([^<]*)<' /></div>
    <div class="property"><div class="name">Item Description:</div><input type="text" name="item_description" value="(?s)<p>(.*)</p>" /></div>
    <div class="property"><div class="name">Item Link:</div><input type="text" name="item_link" value='([^"]*)" class' /></div>
    <div class="property"><div class="name">Item UUID:</div><input type="text" name="item_uuid" value="(?s)<p>(.*)</p>" /></div>
    <input type="submit" value="add" />
</form>
{% for source in sources %}
<form method="post" action="/source/put" >
    <input type="hidden" name="id" value="{{source.key.id}}" />
    <div class="property"><div class="name">Test proxy:</div><a href="/proxy?id={{ source.key.id }}">{{ source.url|escape }}</a></div>
    <div class="property"><div class="name">RSS 2.0 Link:</div><a href="/feed?id={{ source.key.id }}">{{ source.title|escape }}</a></div>
    <div class="property"><div class="name">Atom Link:</div><a href="/feed?format=atom&amp;id={{ source.key.id }}">{{ source.title|escape }}</a></div>
    <div class="property"><div class="name">Title:</div><input type="text" name="title" value="{{ source.title|escape }}" /></div>
    <div class="property"><div class="name">Description:</div><input type="text" name="description" value="{{ source.description|escape }}" /></div>
    <div class="property"><div class="name">Target Url:</div><input type="text" name="url" value="{{ source.url|escape }}" /></div>
    <div class="property"><div class="name">Cookie:</div><input type="text" name="cookie" value="{{ source.cookie|escape }}" /></div>
    <div class="property"><div class="name">Item Region:</div><input type="text" name="item_region" value="{{ source.item_region|escape }}" /></div>
    <div class="property"><div class="name">Item Separator:</div><input type="text" name="item_separator" value="{{ source.item_separator|escape }}" /></div>
    <div class="property"><div class="name">Item Title:</div><input type="text" name="item_title" value="{{ source.item_title|escape }}" /></div>
    <div class="property"><div class="name">Item Description:</div><input type="text" name="item_description" value="{{ source.item_description|escape }}" /></div>
    <div class="property"><div class="name">Item Link:</div><input type="text" name="item_link" value="{{ source.item_link|escape }}" /></div>
    <div class="property"><div class="name">Item UUID:</div><input type="text" name="item_uuid" value="{{ source.item_uuid|escape }}" /></div>
    <input type="submit" value="update" />
</form>
<form method="post" action="/source/put" >
    <input type="hidden" name="title" value="{{ source.title|escape }}" />
    <input type="hidden" name="description" value="{{ source.description|escape }}" />
    <input type="hidden" name="url" value="{{ source.url|escape }}" />
    <input type="hidden" name="cookie" value="{{ source.cookie|escape }}" />
    <input type="hidden" name="item_region" value="{{ source.item_region|escape }}" />
    <input type="hidden" name="item_separator" value="{{ source.item_separator|escape }}" />
    <input type="hidden" name="item_title" value="{{ source.item_title|escape }}" />
    <input type="hidden" name="item_description" value="{{ source.item_description|escape }}" />
    <input type="hidden" name="item_link" value="{{ source.item_link|escape }}" />
    <input type="hidden" name="item_uuid" value="{{ source.item_uuid|escape }}" />
    <input type="submit" value="clone" />
</form>
<form method="post" action="/source/del" >
    <input type="hidden" name="id" value="{{source.key.id}}" />
    <input type="submit" value="delete" />
</form>
{% endfor %}
</body>
</html>